// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.OptionItem;
import com.fowo.api.entity.PurchasePlans;
import com.fowo.api.model.purchase.plans.PurchasePlansDetailedInfoParam;
import com.fowo.api.model.purchase.plans.PurchasePlansItemVo;
import com.fowo.api.model.purchase.plans.PurchasePlansSearchParamPo;
import com.fowo.api.model.purchase.plans.PurchasePlansVo;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface PurchasePlansMapper extends BaseMapper<PurchasePlans> {
  Page<PurchasePlansItemVo> pageSearch(
    @Param("page") Page page,
    @Param("search") PurchasePlansSearchParamPo search
  );
  List<OptionItem<PurchasePlansItemVo>> searchOptions(
    @Param("search") PurchasePlansSearchParamPo search
  );
  List<PurchasePlansItemVo> search(
    @Param("search") PurchasePlansSearchParamPo search
  );
  Date searchLastUpdateTime(@Param("search") PurchasePlansSearchParamPo search);
  /**
   * 搜索满足条件的所有记录的编号列表
   * @param search 搜索参数
   * @return 编号列表
   */
  List<Long> searchIds(@Param("search") PurchasePlansSearchParamPo search);
  /**
   * 搜索满足条件的记录数量
   * @param search 搜索参数
   * @return 记录数量
   */
  Long searchCount(@Param("search") PurchasePlansSearchParamPo search);
  Long getIdByPpgSn(@Param("ppgSn") String ppgSn);

  List<Long> getIdsByPpgSn(@Param("list") List<String> list);

  String getPpgSnById(@Param("id") Long id);

  List<Map<String, Object>> getPpgSnByIds(@Param("ids") List<Long> ids);
  PurchasePlansVo selectVoById(@Param("id") Long id);
  /** 更新指定对象的所有计算字段值 */
  int updateCalcFields(Long id);
  /**
   * 全部
   */
  List<PurchasePlansItemVo> complete(
    @Param("search") PurchasePlansSearchParamPo search
  );

  /**
   * 获取全部编号列表
   */
  List<Long> completeIds(@Param("search") PurchasePlansSearchParamPo search);

  /**
   * 获取全部的总数
   */
  Long completeCount(@Param("search") PurchasePlansSearchParamPo search);

  /**
   * 全部分页
   */
  Page<PurchasePlansItemVo> completePage(
    @Param("page") Page page,
    @Param("search") PurchasePlansSearchParamPo search
  );
  Date completeLastUpdateTime(
    @Param("search") PurchasePlansSearchParamPo search
  );
  /**
   * 待提交
   */
  List<PurchasePlansItemVo> waitingSubm(
    @Param("search") PurchasePlansSearchParamPo search
  );

  /**
   * 获取待提交编号列表
   */
  List<Long> waitingSubmIds(@Param("search") PurchasePlansSearchParamPo search);

  /**
   * 获取待提交的总数
   */
  Long waitingSubmCount(@Param("search") PurchasePlansSearchParamPo search);

  /**
   * 待提交分页
   */
  Page<PurchasePlansItemVo> waitingSubmPage(
    @Param("page") Page page,
    @Param("search") PurchasePlansSearchParamPo search
  );
  Date waitingSubmLastUpdateTime(
    @Param("search") PurchasePlansSearchParamPo search
  );
  /**
   * 待审批
   */
  List<PurchasePlansItemVo> theapprovalispending(
    @Param("search") PurchasePlansSearchParamPo search
  );

  /**
   * 获取待审批编号列表
   */
  List<Long> theapprovalispendingIds(
    @Param("search") PurchasePlansSearchParamPo search
  );

  /**
   * 获取待审批的总数
   */
  Long theapprovalispendingCount(
    @Param("search") PurchasePlansSearchParamPo search
  );

  /**
   * 待审批分页
   */
  Page<PurchasePlansItemVo> theapprovalispendingPage(
    @Param("page") Page page,
    @Param("search") PurchasePlansSearchParamPo search
  );
  Date theapprovalispendingLastUpdateTime(
    @Param("search") PurchasePlansSearchParamPo search
  );
  /**
   * 待采购
   */
  List<PurchasePlansItemVo> tobepurchased(
    @Param("search") PurchasePlansSearchParamPo search
  );

  /**
   * 获取待采购编号列表
   */
  List<Long> tobepurchasedIds(
    @Param("search") PurchasePlansSearchParamPo search
  );

  /**
   * 获取待采购的总数
   */
  Long tobepurchasedCount(@Param("search") PurchasePlansSearchParamPo search);

  /**
   * 待采购分页
   */
  Page<PurchasePlansItemVo> tobepurchasedPage(
    @Param("page") Page page,
    @Param("search") PurchasePlansSearchParamPo search
  );
  Date tobepurchasedLastUpdateTime(
    @Param("search") PurchasePlansSearchParamPo search
  );
  /**
   * 已完成
   */
  List<PurchasePlansItemVo> completed(
    @Param("search") PurchasePlansSearchParamPo search
  );

  /**
   * 获取已完成编号列表
   */
  List<Long> completedIds(@Param("search") PurchasePlansSearchParamPo search);

  /**
   * 获取已完成的总数
   */
  Long completedCount(@Param("search") PurchasePlansSearchParamPo search);

  /**
   * 已完成分页
   */
  Page<PurchasePlansItemVo> completedPage(
    @Param("page") Page page,
    @Param("search") PurchasePlansSearchParamPo search
  );
  Date completedLastUpdateTime(
    @Param("search") PurchasePlansSearchParamPo search
  );
  /**
   * 已驳回
   */
  List<PurchasePlansItemVo> rejected(
    @Param("search") PurchasePlansSearchParamPo search
  );

  /**
   * 获取已驳回编号列表
   */
  List<Long> rejectedIds(@Param("search") PurchasePlansSearchParamPo search);

  /**
   * 获取已驳回的总数
   */
  Long rejectedCount(@Param("search") PurchasePlansSearchParamPo search);

  /**
   * 已驳回分页
   */
  Page<PurchasePlansItemVo> rejectedPage(
    @Param("page") Page page,
    @Param("search") PurchasePlansSearchParamPo search
  );
  Date rejectedLastUpdateTime(
    @Param("search") PurchasePlansSearchParamPo search
  );
  /**
   * 已作废
   */
  List<PurchasePlansItemVo> havebeenvoided(
    @Param("search") PurchasePlansSearchParamPo search
  );

  /**
   * 获取已作废编号列表
   */
  List<Long> havebeenvoidedIds(
    @Param("search") PurchasePlansSearchParamPo search
  );

  /**
   * 获取已作废的总数
   */
  Long havebeenvoidedCount(@Param("search") PurchasePlansSearchParamPo search);

  /**
   * 已作废分页
   */
  Page<PurchasePlansItemVo> havebeenvoidedPage(
    @Param("page") Page page,
    @Param("search") PurchasePlansSearchParamPo search
  );
  Date havebeenvoidedLastUpdateTime(
    @Param("search") PurchasePlansSearchParamPo search
  );
  /**
   * 获取采购计划生成
   */
  void detailedInfo(PurchasePlansDetailedInfoParam param);
}
